package com.hbpa.pan.schedule;

import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;

/**
 * @author: BlcakTiger
 * @date: 2023/10/19 20:45
 * @contact: hsf6661@163.com
 * @description: 调度器配置
 */
@SpringBootConfiguration
public class ScheduleConfig {

    /**
     * {@ThreadPoolTaskScheduler} 是Spring框架中用于处理定时任务的调度器之一
     * @return ThreadPoolTaskScheduler对象
     */
    @Bean
    public ThreadPoolTaskScheduler taskScheduler(){
        return new ThreadPoolTaskScheduler();
    }
}
